how to find speed in quadratic equations